/*
 Navicat Premium Data Transfer

 Source Server         : demo
 Source Server Type    : MySQL
 Source Server Version : 80031
 Source Host           : localhost:3306
 Source Schema         : 2102A-week201

 Target Server Type    : MySQL
 Target Server Version : 80031
 File Encoding         : 65001

 Date: 24/08/2023 11:46:42
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for asset_dept
-- ----------------------------
DROP TABLE IF EXISTS `asset_dept`;
CREATE TABLE `asset_dept` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '部门id',
  `name` varchar(255) DEFAULT NULL COMMENT '部门名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ;

-- ----------------------------
-- Records of asset_dept
-- ----------------------------
BEGIN;
INSERT INTO `asset_dept` (`id`, `name`) VALUES (1, '部门1');
INSERT INTO `asset_dept` (`id`, `name`) VALUES (2, '部门2');
COMMIT;

-- ----------------------------
-- Table structure for asset_info
-- ----------------------------
DROP TABLE IF EXISTS `asset_info`;
CREATE TABLE `asset_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `num` varchar(255) DEFAULT NULL,
  `specification` varchar(255) DEFAULT NULL,
  `typeId` int DEFAULT NULL COMMENT '资产类型id',
  `sourceId` int DEFAULT NULL COMMENT '资产来源id',
  `ownDeptId` int DEFAULT NULL COMMENT '所属部门id',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `useDeptId` int DEFAULT NULL COMMENT '使用部门id',
  `createTime` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `indx_num` (`num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 ;

-- ----------------------------
-- Records of asset_info
-- ----------------------------
BEGIN;
INSERT INTO `asset_info` (`id`, `name`, `num`, `specification`, `typeId`, `sourceId`, `ownDeptId`, `price`, `useDeptId`, `createTime`) VALUES (7, 'qwe', '123qwe', NULL, 1, 1, NULL, 100.00, NULL, NULL);
INSERT INTO `asset_info` (`id`, `name`, `num`, `specification`, `typeId`, `sourceId`, `ownDeptId`, `price`, `useDeptId`, `createTime`) VALUES (8, 'qwe', '456qwe', NULL, 1, 1, NULL, 100.00, NULL, NULL);
INSERT INTO `asset_info` (`id`, `name`, `num`, `specification`, `typeId`, `sourceId`, `ownDeptId`, `price`, `useDeptId`, `createTime`) VALUES (9, '123', '123qweeeee', NULL, 1, 1, NULL, 123.00, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for asset_source
-- ----------------------------
DROP TABLE IF EXISTS `asset_source`;
CREATE TABLE `asset_source` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '来源id',
  `name` varchar(255) DEFAULT NULL COMMENT '来源名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ;

-- ----------------------------
-- Records of asset_source
-- ----------------------------
BEGIN;
INSERT INTO `asset_source` (`id`, `name`) VALUES (1, '来源1');
INSERT INTO `asset_source` (`id`, `name`) VALUES (2, '来源2');
COMMIT;

-- ----------------------------
-- Table structure for asset_type
-- ----------------------------
DROP TABLE IF EXISTS `asset_type`;
CREATE TABLE `asset_type` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '类型id',
  `name` varchar(255) DEFAULT NULL COMMENT '类型名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of asset_type
-- ----------------------------
BEGIN;
INSERT INTO `asset_type` (`id`, `name`) VALUES (1, '类型1');
INSERT INTO `asset_type` (`id`, `name`) VALUES (2, '类型2');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
